const xml2js=require('xml2js');
const fs =require('fs');
var xmlParse=xml2js.Parser();
var readXml=fs.createReadStream('city.xml');
var data ='';
readXml.on('data',function(trunk){
    data  +=rs;
    xmlParse.ParserString(data,function(error,result){
        if(err) throw err;
        var res= JSON.stringfy(result);
        var writexml =fs.createWriteStream('city.json');
        writexml.write(res);
        writexml.end();
    });
});